/**
 * 
 */
package com.diallom.bd;

import android.location.Location;

/**
 * @author diallom
 *
 */
public class Parking {
	private int id;
	private String nameParking;
	private int nbOfPlaces;
	private String stationnement;
	private Location location;
	private float note;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getNameParking() {
		return nameParking;
	}
	public void setNameParking(String nameParking) {
		this.nameParking = nameParking;
	}
	public int getNbOfPlaces() {
		return nbOfPlaces;
	}
	public void setNbOfPlaces(int nbOfPlaces) {
		this.nbOfPlaces = nbOfPlaces;
	}
	public String getStationnement() {
		return stationnement;
	}
	public void setStationnement(String stationnement) {
		this.stationnement = stationnement;
	}
	public float getNote() {
		return note;
	}
	public void setNote(float note) {
		this.note = note;
	}
	
	public String getLocation() {
		return location.getLongitude()+" "
			   +location.getLatitude();
	}
	public void setLocation(Location location) {
		this.location = location;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof Parking))
			return false;
		Parking other = (Parking) obj;
		if (id != other.id)
			return false;
		if (nameParking == null) {
			if (other.nameParking != null)
				return false;
		} else if (!nameParking.equals(other.nameParking))
			return false;
		if (nbOfPlaces != other.nbOfPlaces)
			return false;
		if (note != other.note)
			return false;
		if (stationnement == null) {
			if (other.stationnement != null)
				return false;
		} else if (!stationnement.equals(other.stationnement))
			return false;
		return true;
	}
	
	
	
	
	
}
